Imports obout_ASPTreeView_Pro_NET
Imports ccapps.persistent.authorization
Imports ccapps.persistent.pttsorgu

Namespace Web.page

    Public Class PttSorgu
        Inherits [lib].BasePage

#Region " Web Form Designer Generated Code "

        'This call is required by the Web Form Designer.
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

        End Sub
        Protected WithEvents TreeView As System.Web.UI.WebControls.Literal
        Protected WithEvents chk_a0 As System.Web.UI.WebControls.CheckBox
        Protected WithEvents ltlAlert As System.Web.UI.WebControls.Literal
        Protected WithEvents Repeater1 As System.Web.UI.WebControls.Repeater
        Protected WithEvents proc As System.Web.UI.HtmlControls.HtmlInputHidden
        Protected WithEvents userid As System.Web.UI.WebControls.TextBox
        Protected WithEvents username As System.Web.UI.WebControls.TextBox
        Protected WithEvents Txt1 As System.Web.UI.HtmlControls.HtmlInputHidden
        Protected WithEvents msisdn As System.Web.UI.WebControls.TextBox
        Protected WithEvents Lblok As System.Web.UI.WebControls.Label
        'NOTE: The following placeholder declaration is required by the Web Form Designer.
        'Do not delete or move it.
        Private designerPlaceholderDeclaration As System.Object

        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            'CODEGEN: This method call is required by the Web Form Designer
            'Do not modify it using the code editor.
            InitializeComponent()
        End Sub

        Public Sub ASPNET_MsgBox(ByVal Message As String)

            System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)

            System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf)

            System.Web.HttpContext.Current.Response.Write("</SCRIPT>")

        End Sub


#End Region
        '    Public ilk_internalID As Integer = 0
        Dim button_add As Integer

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            Me.PageTitle = "Ptt Sorgu"
            ' default_tree()
            Dim Vproc As String
            Vproc = Me.proc.Value
            Me.proc.Value = ""
            Dim temp As DataTable

            If Vproc <> "" Then
                Dim sql As String

                If Me.msisdn.Text <> "" Then
                    'sql = " select * from customer_all where custcode ='" & Me.custcode.Text & "' "
                    temp = MsisdnControl(Me.msisdn.Text)
                    If temp.Rows().Count = 0 Then
                        Message = "alert('Msisdn e karsilik Barcode numarasi bulunamadi ! ')"
                        Exit Sub
                    End If
                Else
                    Message = "alert('MSISDN girmelisiniz ! ')"
                    Exit Sub
                End If

            End If

            Select Case Vproc
                Case "link"
                    Message = "window.open('http://apps.ptt.gov.tr/contextroot/wanjsp/GonderiCevap.jsp?BARKODNO=" & temp.Rows(0)(0) & "');"
            End Select

        End Sub

    End Class

End Namespace